<#include "../common/layout/__mainlayout.html">
    <#include "../common/__pagination.html">

        <!--设置面包屑-->
        <#assign pageBreadCrumbs>
            <li class="active"><a href="#">系统日志管理</a></li>
        </#assign>
        <#assign pageCss>
            <!-- page specific plugin styles -->
            <link rel="stylesheet" href="${ctx}/static/admin/assets/css/jquery-ui.custom.css"/>
            <link rel="stylesheet" href="${ctx}/static/admin/assets/css/chosen.css"/>
            <link rel="stylesheet" href="${ctx}/static/admin/assets/css/datepicker.css"/>
            <link rel="stylesheet" href="${ctx}/static/admin/assets/css/daterangepicker.css"/>
        </#assign>

        <#assign pageJavascript>
            <script type="text/javascript">
                $(document).ready(function () {
                    $("#moduleType").val(${query.moduleType!});

                    //初始化范围选择器
                    $('input[name=createTimeRange]').daterangepicker({
                        'applyClass' : 'btn-sm btn-success',
                        'cancelClass' : 'btn-sm btn-default',
                        locale: {
                            applyLabel: '确定',
                            cancelLabel: '取消'
                        }
                    });


                    $('[data-rel=tooltip]').tooltip();

                    if (!ace.vars['touch']) {
                        $('.chosen-select').chosen({allow_single_deselect: true});
                    }

                    // 清除远程modal数据
                    $("#editModal").on("hidden.bs.modal", function () {
                        $(this).removeData("bs.modal");
                    });


                });
            </script>
        </#assign>

        <@mainlayout pageBreadCrumbs=pageBreadCrumbs pageCss=pageCss pageJavascript=pageJavascript
        currentMenu="sysLogMng">
        <div class="row">
            <div class="col-xs-12">
            <form id="searchForm" class="form-search form-inline">
                <div class="row">
                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-group col-xs-12" style="padding-top:10px">
                                <label class="col-xs-1 text-right">模块:</label>
                                <select class=" col-xs-2"  name="moduleType" id="moduleType"  data-placeholder="Choose a State...">
                                    <option value="-1">全部</option>
                                    <#list modules as module>
                                        <option value="${module.id}" >
                                            ${(module.name)!}
                                        </option>
                                    </#list>
                                </select>
                                <label class="col-xs-1 text-right">操作员:</label>
                                <input type="text" id="createName" name="createName" class="input-sm col-xs-2" value="${query.createName!}"/>
                                <label class="col-xs-1 text-right">创建时间:</label>
                                <input type="text" id="createTimeRange" name="createTimeRange" 　value="${query.createTimeRange!}" class="input-sm col-xs-2" value="${query.createTimeRange!}"/>
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <input  type="button" id="searchBtn" class="btn btn-sm btn-primary" onclick="search()" value="查询"/>&nbsp;
                            </div>
                        </div>
                    </div>
                </div>

            <table id="adItemTable" class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <th width="40" align="center">日志编号</th>
                    <th width="100" align="left">操作类型</th>
                    <th width="70" align="left">操作模块</th>
                    <th width="70" align="left">处理对象编号</th>
                    <th width="70" align="left">创建时间</th>
                    <th width="70" align="left">创建人编号</th>
                    <th width="70" align="left">创建人</th>
                </tr>
                </thead>
                <tbody>
                <#list logs.listData as log>
                    <tr>
                        <td>${log.id!}</td>
                        <td>${log.operateTypeName!}</td>
                        <td>${log.moduleTypeName!}</td>
                        <td>${log.objectId!}</td>
                        <td>${log.createTimeShow!}</td>
                        <td>${log.createId!}</td>
                        <td>${log.createName!}</td>

                    </tr>
                </#list>
                </tbody>
            </table>
            <@pagination logs!/>
            </form>
        </div>
        </div>

        <div id="editModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                </div>
            </div>
        </div>
    </@mainlayout>